﻿namespace IBTrader.Modules.Configuration
{
    using System.Configuration;

    class ComponentsSection : ConfigurationSectionGroup
    {
        public static readonly ComponentsSection Components = 
            ConfigurationManager.OpenExeConfiguration( ConfigurationUserLevel.None).GetSectionGroup("Components") as ComponentsSection;

        [ConfigurationProperty("Trader")]
        public Component Trader
        {
            get { return Sections["Trader"] as Component; }
        }

        [ConfigurationProperty("DailyTickData")]
        public Component DailyTickData
        {
            get { return Sections["DailyTickData"] as Component; }
        }

        [ConfigurationProperty("HistoricalData")]
        public Component HistoricalData
        {
            get { return Sections["HistoricalData"] as Component; }
        }

        [ConfigurationProperty("TestClient")]
        public Component TestClient
        {
            get { return Sections["TestClient"] as Component; }
        }
        [ConfigurationProperty("Console")]
        public Component Console
        {
            get { return Sections["Console"] as Component; }
        }
    }
}
